home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 89 / maccd 89.iso / utilities / Mac OS X / ProcessWizard.dmg / ProcessWizard / ProcessWizard Daemon.app / Contents / Resources / nice.pl < prev    next >
Encoding:
Perl Script  |  2002-01-24  |  294 b   |  22 lines

  1. #!/usr/bin/perl
  2. # USAGE : nice.pl <pid> 
  3.  
  4. $pid = $ARGV[0];
  5.  
  6. open SHELL2, "ps -p$pid -oni |" or die "probleme";
  7.  
  8. # NI
  9. # 5
  10.  
  11.     #<SHELL2>; # On oublie ainsi la première ligne (PID NI COMMAND)
  12.     while (<SHELL2>)
  13.     { 
  14.         chop;
  15.         @t = split(" ", $_, 1) ;
  16.  
  17.         $pid = $t[0] ;
  18.     }
  19. close SHELL2;
  20.  
  21. print $pid;